﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <link href="/Web/CSS/main.css" rel="stylesheet" />
    <link href="/Web/CSS/reset.css" rel="stylesheet" />
    <link href="../CSS/regit.css" rel="stylesheet" />
    <script src="../JS/jquery-1.11.2.min.js"></script>
    <script src="../JS/avalon1.47.js"></script>
    <script src="../JS/jquery-migrate-1.1.0.min.js"></script>
    <style>
        body {
            font: 12px/1.5 "Microsoft YaHei",SimSun,Tahoma, Helvetica, Arial, sans-serif;
        }

        .listUl {
            list-style: square inside;
        }

            .listUl li {
                margin-top: 10px;
                font-size: 13px;
                font-family: "宋体";
            }

            .listUl .listDate {
                float: right;
            }

        .pageNum {
            width: 30px;
        }

        .pageLink {
            margin-top: 10px;
            text-align: center;
        }

            .pageLink span {
                margin: 0 5px;
            }

        @CHARSET "UTF-8";

        #pages {
            width: 100%;
            clear: both;
            text-align: center;
            font-size: 12px;
            font-family: Verdana, Arial, Helvetica, sans-serif;
            margin-top: 20px;
            margin-bottom: 20px;
            color: #8d8d8d;
        }

            #pages a, #pages span {
                margin-left: 3px;
                margin-right: 3px;
                width: 22px;
                height: 22px;
                line-height: 22px;
                border: 1px solid #e0e0e0;
                color: #aaa;
                display: inline-block;
            }

                #pages a:hover {
                    border: 1px solid #a0a0a0;
                }

            #pages span {
                background: #f0f0f0;
                color: #ffffff;
            }

            #pages span {
                font-weight: bold;
                position: relative;
                top: 0px;
            }

            #pages a.previous {
                width: 25px;
                position: relative;
                top: 0px;
            }

            #pages a.next {
                width: 25px;
                position: relative;
                top: 0px;
            }

        .regFieldMsg {
            display: none;
        }
    </style>
    <script>
        var model = avalon.define({
            $id: "zhuce",
            bz: "1",//当前步骤
            njdata: [],
            yxdata: [],
            zydata: [],
            bjdata: [],
            xydata: [],//校友数据
            gwdata: [],
            nouser: {},
            fungetzy: function (nj, yx) {
                $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_GETZY&r=" + Math.random(), { P1: nj, P2: yx }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.zydata = resultData.Result;
                    }
                });
            },//获取专业
            njchange: function () {//年级变化
                if ($("#startyear").val() == '1994' || $("#startyear").val() * 1 < 1994) {
                    $("#1994N").hide()
                    $(".regSubmit").hide()
                    $("#1994").show();
                } else {
                    $("#1994N").show()
                    $(".regSubmit").show()
                    $("#1994").hide();


                    model.zydata = [];
                    model.bjdata = [];
                    model.fungetzy($("#startyear").val(), $("#jdyx").val())
                }

            },
            yxchange: function () {//院系变化
                model.zydata = [];
                model.bjdata = [];
                model.fungetzy($("#startyear").val(), $("#jdyx").val())
            },
            zychange: function ($dom) {//专业变化
                model.bjdata = [];
                $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_GETBJ&r=" + Math.random(), { P1: $("#startyear").val(), P2: $("#jdyx").val(), ZY: $dom.val() }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.bjdata = resultData.Result;
                    }
                });
            },
            checkbz1: function () {
                return true;
            },
            regNext: function () {
                if (model.bz == "1" && model.checkbz1()) {
                    $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_XYYZ&r=" + Math.random(), { P1: $("#classname").val(), P2: $("#xyname").val() }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            model.xydata = resultData.Result;
                            if (model.xydata.size() > 0) {
                                model.bz = "2";
                            } else {
                                alert("没有找到匹配的校友信息")
                            }
                        }
                    });
                }
                if (model.bz == "2") {
                    $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_XYZC&r=" + Math.random(), { P1: $("#dqxy").val(), P2: $("#name").val(), PSD: $("#dlmm").val(), dwlb: $("#dwlb").val(), dwmc: $("#dwmc").val(), gwlb: $("#gwlb").val(), zwmc: $("#zwmc").val() }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            model.nouser = resultData.Result;
                            model.bz = "3";
                        }
                    });
                }
            }
        })
        avalon.ready(function () {
            $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_GETGWDATA&r=" + Math.random(), { P1: "" }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.gwdata = resultData.Result;
                }
            });
            $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_GETNJANDYX&r=" + Math.random(), { P1: "" }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.njdata = resultData.Result;
                    model.yxdata = resultData.Result1;

                }
            });
        })

        function getquery(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
    </script>
</head>
<body ms-controller="zhuce">
    <div class="eyeview content list alumniReg">
        <div class="listNav">

            <div class="s_center" style="margin-top: 10px;">
                <!--beginblock id=jjh-bg -->
                <img id="bg_1" src="/Web/image/bg_8.jpg" style="display: inline;">
            </div>

        </div>

        <div class="listContent zy-lico">
            <div class="regLeft">
                <div ms-attr-class="regTitle{{bz}}"></div>
                <div class="regTip">温馨提示：为确保本站注册校友的真实性，请您如实填写下面信息以便档案验证。</div>
                <div id="studyPanel" ms-if="bz=='1'">
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>真实姓名：</div>
                        <div class="regField">
                            <div class="regField">
                                <input type="text" id="xyname" name="xyname" class="regTxt" value="" style="width: 238px" maxlength="50">
                            </div>
                            <div class="regFieldMsg">请填写您的真实姓名</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>入校年份(年级)：</div>
                        <div class="regField">
                            <div class="regField">
                                <select id="startyear" name="startyear" class="regSel" style="width: 243px" onchange="model.njchange($(this))">
                                    <option value="">请选择年级</option>
                                    <option ms-attr-value="{{el.nj}}" ms-repeat-el="njdata">{{el.nj}}</option>
                                </select>
                            </div>

                            <div class="regFieldMsg">请选择入校年份</div>
                        </div>
                    </div>
                    <div id="1994N">
                        <div class="regLine">
                            <div class="regLabel"><span class="regMust">* </span>就读院系：</div>
                            <div class="regField">
                                <div id="academyNameDiv" class="regField">


                                    <select id="jdyx" name="jdyx" class="regSel" style="width: 243px" onchange="model.yxchange($(this))">
                                        <option value="">请选择院系</option>
                                        <option ms-repeat-el="yxdata" ms-attr-value="{{el.xbdm}}">{{el.xbmc}}</option>
                                    </select>
                                </div>

                                <div id="academyNameMsg" class="regFieldMsg">
                                    请选择就读院系
							
                                </div>
                            </div>
                        </div>
                        <div class="regLine">
                            <div class="regLabel"><span class="regMust">* </span>专业：</div>
                            <div class="regField">
                                <div class="regField">
                                    <select id="majorname" name="majorname" class="regSel" style="width: 243px" onchange="model.zychange($(this))">
                                        <option value="">请选择专业</option>
                                        <option ms-repeat-el="zydata" ms-attr-value="{{el.zymc}}">{{el.zymc}}</option>
                                    </select>
                                </div>
                                <div class="regFieldMsg">请填写专业或院系关键字</div>
                            </div>
                        </div>
                        <div class="regLine">
                            <div class="regLabel"><span class="regMust">* </span>班级：</div>
                            <div class="regField">
                                <div class="regField">
                                    <select id="classname" name="classname" class="regSel" style="width: 243px">
                                        <option value="">请选择班级</option>
                                        <option ms-repeat-el="bjdata" ms-attr-value="{{el.bh}}">{{el.bj}}</option>


                                    </select>
                                </div>
                                <div class="regFieldMsg">请填写班级关键字</div>
                            </div>
                        </div>

                    </div>
                    <div id="1994" style="display:none" >
                        <div> 
                            <img src="../image/WUXIEWM.jpg" alt="Alternate Text" />
                        </div>
                                                <p>请使用微信关注公众号后在微信端注册</p>

                    </div>

                </div>
                <div ms-if="bz=='2'">
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>当前校友：</div>
                        <div class="regField">
                            <div class="regField">
                                <select id="dqxy" name="dqxy" class="regSel" style="width: 243px">
                                    <option value="">请选择当前校友</option>
                                    <option ms-repeat-el="xydata" ms-attr-value="{{el.xh}}">{{el.xm+el.xh}}</option>
                                </select>
                            </div>

                            <div id="academyNameMsg" class="regFieldMsg">
                                请选择当前校友
							
                            </div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>手机号：</div>
                        <div class="regField">
                            <div class="regField">
                                <input type="text" id="name" name="name" class="regTxt" value="" style="width: 238px" maxlength="50">
                            </div>
                            <div class="regFieldMsg">请填写您的手机号</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>登陆密码：</div>
                        <div class="regField">
                            <div class="regField">
                                <input type="password" id="dlmm" name="dlmm" class="regTxt" value="" style="width: 238px" maxlength="50">
                            </div>
                            <div class="regFieldMsg">请填登陆密码</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>所在单位类别：</div>
                        <div class="regField">
                            <div class="regField">
                                <select id="dwlb" name="dwlb" class="regSel" style="width: 243px">
                                    <option value="">请选择单位类别</option>
                                    <option>政府单位</option>
                                    <option>事业单位</option>
                                    <option>跨国企业</option>
                                    <option>国企</option>
                                    <option>大型民营企业</option>
                                    <option>中小型民营企业</option>
                                    <option>其它</option>
                                </select>
                            </div>
                            <div class="regFieldMsg">请选择单位类别</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>单位名称：</div>
                        <div class="regField">
                            <div class="regField">
                                <input type="text" id="dwmc" name="dwmc" class="regTxt" value="" style="width: 238px" maxlength="50">
                            </div>
                            <div class="regFieldMsg">请填写单位名称</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>岗位类别：</div>
                        <div class="regField">
                            <div class="regField">
                                <select id="gwlb" name="gwlb" class="regSel" style="width: 243px">
                                    <option value="">请选择岗位类别</option>
                                    <option ms-repeat-el="gwdata" ms-attr-value="{{el.ID}}">{{el.gwlb}}</option>
                                </select>
                            </div>
                            <div class="regFieldMsg">请选择岗位</div>
                        </div>
                    </div>
                    <div class="regLine">
                        <div class="regLabel"><span class="regMust">* </span>职位：</div>
                        <div class="regField">
                            <div class="regField">
                                <input type="text" id="zwmc" name="zwmc" class="regTxt" value="" style="width: 238px" maxlength="50">
                            </div>
                            <div class="regFieldMsg">请填写职位</div>
                        </div>
                    </div>

                </div>
                <div ms-if="bz==3">
                    注册成功,用户名：{{nouser.nzcname}}，密码：{{nouser.pas}}
                </div>

                <div class="regSubmit">
                    <div class="regSubmitLeft">
                        已有帐号&gt;<a href="../Login.html" class="regGoLogin" title="返回登录">登录</a>
                    </div>
                    <div class="regSubmitRight">
                        <input type="button" class="regNext" value="" title="下一步" ms-click="regNext()">
                    </div>
                </div>
                <div class="regNotice"></div>
            </div>
        </div>
        <div class="cl"></div>

    </div>
</body>
</html>
